<?php
require 'db_config.php';
require 'open_db.php';
require_once 'includes/resources.php';

include 'includes/header.php';

if(isset($_GET['submit'])){
	$name = $_GET['name'];
	$value = $_GET['value'];
	variable_set($name,$value);
}
?>
<body>
<?php 
 echo "<div><p>";
 print_r($conf);
 echo "</p></div>";
if(isset($_GET['submit'])){
 echo "<div><p>Variable: " . $name . " set to: " . $value . ".</p></div>";

 echo "<div><p>Variable stored in conf as: " . $conf[$name].name . " with a value of: " . $conf[$name].value . ".</p></div>";
}else
?>
<form action="conf.php" method="get">
<table>
<tr>
<td><p>Set variable:</p></td><td><p><input name="name" type="text" size="20" /></p></td>
<td>
<p>
<textarea rows="10" cols="40" name="value"></textarea>
</p>
</td>
</tr>
<tr>
<td colspan="3"><p><input type="submit" name="submit" value="submit" /></p></td>
</tr>

</table>

</form>
</body>
</html>